<template>
    <!-- 这里的v-color="'red'"是全局指令，在src文件夹下的directives文件夹下的modules文件夹下的color.js -->
  <div v-color="'red'">
    <h2>局部中定义的指令</h2>
    <input type="text" v-focus="{ h: 20, w: 200}" />
  </div>
</template>

<script setup>
defineOptions({
    name: 'ziling'
})
const vFocus = {
    mouted(el,binding) {
        el.style.width = binding.value.w + 'px'
        el.style.height = binding.value.h + 'px'
        el.focus
    }
}

</script>

<style  lang="scss" scoped>
</style>